<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ current_page.page_title }}</title>
    <!--引入 Bootstrap -->
    <link href="http://apps.bdimg.com/libs/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 Shim 和 Respond.js 用于让 IE8 支持 HTML5元素和媒体查询 -->
    <!-- 注意： 如果通过 file://  引入 Respond.js 文件，则该文件无法起效果 -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
      <![endif]-->
    <script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="http://apps.bdimg.com/libs/bootstrap/3.2.0/js/bootstrap.min.js"></script>

    <style type="text/css">
        div {font-size: 20px}
    </style>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F23e806d9d144dfa9762e696f1d3d6a35' type='text/javascript'%3E%3C/script%3E"));
</script>

</head>
<body>
    <div class="container">
	    <div class="row">
		    <div class="span12">
			    <h3 class="text-center">
			    {{ current_page.page_title }}
			    </h3>
			{{ current_page.content|safe }}

		    </div>
	    </div>
    </div>
    <br>
    <br>
    <br>
    <br>

    <ul class="pager navbar-fixed-bottom">

    {% if pre_page %}
        <li class="previous "><a href="{% url 'page' book_id pre_page %}">&larr;上一章 </a> </li>
    {% endif %}
    <li class="button"><a href="{% url 'book' book_id  %}">目录</a></li>
    {% if current_page.book_id %}
        <li class="next"><a href="{% url 'page' book_id next_page %}">下一章&rarr;</a> </li>
    {% endif %}
    </ul>
<script type="text/javascript">
    function jumpPge(){
        var event = document.all ? window.event : arguments[0];
        if(event.keyCode == 37) document.location = "{% url 'page' book_id pre_page %}";
        if(event.keyCode == 39) document.location = "{% url 'page' book_id next_page %}";
    }
    document.onkeydown = jumpPge;
</script>
</body>
</html>